<!DOCTYPE html>
<html>
<head>
<title>患者详细信息</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<link rel="stylesheet" href="../../css/bootstrap.min.css">
<link rel="stylesheet" href="../../css/font-awesome.min.css">
<link rel="stylesheet" href="../../plugins/jqgrid/ui.jqgrid-bootstrap.css">
<link rel="stylesheet" href="../../plugins/ztree/css/metroStyle/metroStyle.css">
<link rel="stylesheet" href="../../css/main.css">
<script src="../../libs/jquery.min.js"></script>
<script src="../../plugins/layer/layer.js"></script>
<script src="../../libs/bootstrap.min.js"></script>
<script src="../../libs/vue.min.js"></script>
<script src="../../plugins/jqgrid/grid.locale-cn.js"></script>
<script src="../../plugins/jqgrid/jquery.jqGrid.min.js"></script>
<script src="../../plugins/ztree/jquery.ztree.all.min.js"></script>
<script src="../../js/common.js"></script>
</head>
<body>
<div id="rrapp" v-cloak>
	<div v-show="showList">
		<div class="grid-btn">
			<div class="form-group col-sm-2">
				<input type="text" class="form-control" v-model="q.sickName" @keyup.enter="query" placeholder="姓名">
			</div>
			<a class="btn btn-default" @click="query">查询</a>
			<a v-if="hasPermission('pro:sickdetail:save')" class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
			<a v-if="hasPermission('pro:sickdetail:update')" class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
			<a v-if="hasPermission('pro:sickdetail:delete')" class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
		</div>
	    <table id="jqGrid"></table>
	    <!-- 分页 -->
	    <div id="jqGridPager"></div>
    </div>
    <!-- 新增 -->
    <div v-show="!showList" class="panel panel-default">
		<div class="panel-heading">{{title}}</div>
		<form class="form-horizontal">
				<div class="form-group">
				<div class="col-sm-2 control-label">姓名</div>
				<div class="col-sm-10">
					<input type="text" class="form-control"   v-model="sickdetail.sickName"   placeholder="姓名"/>
				</div>
			</div>
		<!-- 	<div class="form-group">
				<div class="col-sm-2 control-label">床位号</div>
				<div class="col-sm-10">
					<input type="text" class="form-control"   v-model="sickdetail.bedNO"   placeholder="床位号"/>
				</div>
			</div> -->
			<div class="form-group">
				<div class="col-sm-2 control-label">所属组织</div>
				<div class="col-sm-10">
					<input type="text" class="form-control" style="cursor:pointer;" v-model="sickdetail.deptName" @click="deptTree" readonly="readonly" placeholder="所属组织"/>
				</div>
			</div>
				<div class="form-group">
				<div class="col-sm-2 control-label">所属病区</div>
				<div class="col-sm-10">
					<input type="text" class="form-control" style="cursor:pointer;" v-model="sickdetail.sickAreaName" @click="deptTreeSick" readonly="readonly" placeholder="所属病区"/>
				</div>
			</div>
			
			<div class="form-group">
				<div class="col-sm-2 control-label">选择床号</div>
				<div class="col-sm-10"  placeholder="请选择">
					<select v-model="sickdetail.bedNO" class="form-control" placeholder="请选择" id="bedNO" @click="queryBedNOList">
					        <option value="-1" >请选择</option>  
							<option v-for="option in bedNOList" v-bind:value="option.value"  >
								{{ option.text }}</option>
					</select>
				</div>
			</div>
		<!-- 	<div class="form-group">
				<div class="col-sm-2 control-label">病区编码</div>
				<div class="col-sm-10">
					<input type="text" class="form-control"   v-model="sickdetail.sickAreaNO"   placeholder="病区编码"/>
				</div>
			</div> -->
			
		
			<div class="form-group" v-show="false">
				<div class="col-sm-2 control-label">患者编号</div>
				<div class="col-sm-10">
					<input type="text" class="form-control"   v-model="sickdetail.IDNO"   placeholder="患者编号"/>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">身份证号码</div>
				<div class="col-sm-10">
					<input type="text" class="form-control"   v-model="sickdetail.ICNO"   placeholder="身份证号码"/>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">性别</div>
				<div class="col-sm-10">
				<select v-model="sickdetail.sex" class="form-control">
						  <option value ="0">男</option>
						  <option value ="1">女</option>
				</select>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">年龄</div>
				<div class="col-sm-10">
					<input type="number" class="form-control"   v-model="sickdetail.sickAge"   placeholder="年龄"/>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">住院号<span  style="color: red;font-size: 16px">*</span></div>
				<div class="col-sm-10">
					<input type="text" class="form-control"   v-model="sickdetail.inHosNO"   placeholder="住院号"/>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">入院诊断</div>
				<div class="col-sm-10">
					<input type="text" class="form-control"   v-model="sickdetail.inHosIllRecord"   placeholder="入院诊断"/>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">饮食注意</div>
				<div class="col-sm-10">
					<input type="text" class="form-control"   v-model="sickdetail.dietMatter"   placeholder="饮食注意"/>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">危重情况</div>
				<div class="col-sm-10">
					<input type="text" class="form-control"   v-model="sickdetail.criticalLevel"   placeholder="危重情况"/>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">入院时间</div>
				<div class="col-sm-10">
					<input type="text" class="form-control" onfocus="WdatePicker({skin:'twoer',dateFmt:'yyyy-MM-dd HH:mm:ss'})"  v-model="sickdetail.inHosTime"   placeholder="入院时间" id="inHosTime"/>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">出院时间</div>
				<div class="col-sm-10">
					<input type="text" class="form-control"  onfocus="WdatePicker({skin:'twoer',dateFmt:'yyyy-MM-dd HH:mm:ss'})" v-model="sickdetail.outHosTime"   placeholder="出院时间" id="outHosTime"/>
				</div>
			</div> 
			
			<div class="form-group">
				<div class="col-sm-2 control-label">科室编码</div>
				<div class="col-sm-10">
					<input type="text" class="form-control"   v-model="sickdetail.deptNO"   placeholder="科室编码"/>
				</div>
			</div>
			
			<div class="form-group">
				<div class="col-sm-2 control-label">科室名称</div>
				<div class="col-sm-10">
					<input type="text" class="form-control"   v-model="sickdetail.deptNOName"   placeholder="科室名称"/>
				</div>
			</div>
			<div class="form-group" v-show="false">
				<div class="col-sm-2 control-label">入院天数</div>
				<div class="col-sm-10">
					<input type="number" class="form-control"   v-model="sickdetail.inHostDay"   placeholder="入院天数"/>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">管床医生</div>
				<div class="col-sm-10">
					<input type="text" class="form-control"   v-model="sickdetail.mgBedDoctor"   placeholder="管床医生"/>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">护理等级</div>
				<div class="col-sm-10">
				<select v-model="sickdetail.nurseLevel" class="form-control">
						  <option value ="0">一级护理</option>
						  <option value ="1">二级护级</option>
						  <option value ="2">三级护级</option>
				</select>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">管床护士</div>
				<div class="col-sm-10">
					<input type="text" class="form-control"   v-model="sickdetail.mgBedNurse"   placeholder="管床护士"/>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">医保类型</div>
				<div class="col-sm-10">
				<select v-model="sickdetail.medicalType" class="form-control">
						  <option value ="0">普通</option>
						  <option value ="1">市医保职工</option>
						  <option value ="2">市医保居民</option>
				</select>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">住院预交金</div>
				<div class="col-sm-10">
					<input type="number" class="form-control"   v-model="sickdetail.amountOfMoney"   placeholder="住院预交金（总金额）"/>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">已使用金额</div>
				<div class="col-sm-10">
					<input type="number" class="form-control"   v-model="sickdetail.spendMoney"   placeholder="已使用金额"/>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">可以使用的额度</div>
				<div class="col-sm-10">
					<input type="number" class="form-control"   v-model="sickdetail.limitSpendMoney"   placeholder="可以使用的额度"/>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">余额</div>
				<div class="col-sm-10">
					<input type="number" class="form-control"   v-model="sickdetail.balance"   placeholder="余额"/>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">病种类型</div>
				<div class="col-sm-10">
				<select v-model="sickdetail.sickIllType" class="form-control">
						  <option value ="1">单病种</option>
						  <option value ="2">临床路径</option>
						  <option value ="3">会诊信息</option>
				</select>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">病种说明</div>
				<div class="col-sm-10">
					<input type="text" class="form-control"   v-model="sickdetail.sickIllTypeDiscription"   placeholder="病种说明"/>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">状态</div> 
				<label class="radio-inline">
				  <input type="radio" name="status" value="0" v-model="sickdetail.status"/> 禁用
				</label>
				<label class="radio-inline">
				  <input type="radio" name="status" value="1" v-model="sickdetail.status"/> 正常
				</label>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label"></div> 
				<input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
				&nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
			</div>
		</form>
	</div>
</div>

<!-- 选择组织 -->
<div id="deptLayer" style="display: none;padding:10px;">
	<ul id="deptTree" class="ztree"></ul>
</div>
<!-- 选择病区-->
<div id="deptLayerSick" style="display: none;padding:10px;">
	<ul id="deptTreeSick" class="ztree"></ul>
</div>

<script src="../../js/modules/pro/sickdetail.js"></script>
<script language="javascript" type="text/javascript" src="../../js/modules/WdatePicker.js"></script>
</body>
</html>